package com.luych.toolbox.base.service.dao;

import com.luych.toolbox.base.service.entity.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Optional;

public interface RoleDao extends JpaRepository<Role, String>, JpaSpecificationExecutor<Role> {

    Optional<Role> getByRoleName(String roleName);

    Page<Role> findByRoleNameLike(String roleName, Pageable pageable);


}